<template>
  <div class="edit-enterprise-detail" v-if="props.showDialog">
    <Dialog
      diaTop="7.5"
      headerName="编辑"
      :showDialog="true"
      @close="close"
      @save="save"
      saveLetter="保存"
      diaWidth="55"
      footerTop="10"
    >
      <template #content>
        <div class="content-wrap">
          <el-form
            ref="form"
            :model="formData"
            :rules="rules"
            label-width="200px"
            label-position="rigth"
          >
            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item label="二维码编号：" prop="enterpriseName">
                  <el-input clearable v-model="formData.enterpriseName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="设施名称：">
                  <el-input clearable v-model="formData.permitNumber" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item label="涉废类型：" prop="enterpriseName">
                  <el-input clearable v-model="formData.enterpriseName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item
                  label="处理设计风量(m³/h):"
                 
                  prop="permitNumber"
                >
                  <el-input clearable v-model="formData.permitNumber" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item label="设计使用量(kg)：" prop="enterpriseName">
                  <el-input clearable v-model="formData.enterpriseName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="环保管理员1：" prop="permitNumber">
                  <el-input clearable v-model="formData.permitNumber" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item label="手机号1：" prop="enterpriseName">
                  <el-input clearable v-model="formData.enterpriseName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="环保管理员2：" prop="permitNumber">
                  <el-input clearable v-model="formData.permitNumber" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item label="手机号2：" prop="enterpriseName">
                  <el-input clearable v-model="formData.enterpriseName" />
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="更换周期：" prop="permitNumber">
                  <el-input clearable v-model="formData.permitNumber" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row :gutter="10">
              <el-col :span="12">
                <el-form-item label="设施二维码：" prop="enterpriseName">
                  <div class="facility-code">
                    <img src="" alt="" />
                  </div>
                </el-form-item>
              </el-col>
              <el-col :span="12"> </el-col>
            </el-row>
            <!-- <el-row :gutter="60">
              <el-col :span="24">
                <el-form-item
                  label="排污许可证二维码："
                  label-width="210"
                  prop="enterpriseName"
                >
                  <div class="qr-code">
                    <Upload>
                      <template #content>
                        <div class="content">
                          <img src="" alt="" />
                          <button>点击上传</button>
                        </div>
                      </template>
                    </Upload>
                  </div>
                </el-form-item>
              </el-col>
            </el-row> -->
          </el-form>
        </div>
      </template>
    </Dialog>
  </div>
</template>
<script setup>
import Dialog from "@/components/DialogCross";
import Upload from "@/components/Upload";
let props = defineProps(["showDialog"]);
let emit = defineEmits(["update:showDialog", "save"]);

let formData = reactive({ enterpriseName: "" });

let close = () => {
  console.log("-=-=");
  emit("update:showDialog", false);
};
let save = () => {
  
  emit("save");
};
let rules = {
  enterpriseName: [
    {
      required: true,
      message: "企业名称不能为空",
      trigger: "blur",
    },
  ],
};
</script>
<style lang="scss" scoped>
/* 编辑企业详情页面 */
.edit-enterprise-detail {
  .content-wrap {
    padding-right: 10px;
    .facility-code {
      img {
        width: 182px;
        height: 226px;
      }
    }
    .qr-code {
      width: 826px;
      height: 263px;
      background: #ffffff;
      border-radius: 5px;
      border: 1px solid #bfbfbf;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      .content {
        display: flex;
        flex-direction: column;
        img {
          width: 190px;
          height: 182px;
        }
        button {
          margin-top: 5px;

          font-family: Source Han Sans CN;
          font-weight: 500;
          font-size: 20px;
          color: #0874fa;
        }
      }
    }
  }

  :deep(.el-form-item__label) {
    font-family: Source Han Sans CN;
    font-weight: 500 !important;
    font-size: 20px !important;
    color: #000 !important;
  }
  :deep(.el-input) {
    width: 344px;

    font-family: Source Han Sans CN;
    font-weight: 400;
    font-size: 18px;
    color: #666666 !important;
  }
  :deep(.el-input__inner) {
    font-family: Source Han Sans CN;
    font-weight: 400;
    font-size: 18px;
    color: #666666;
  }
  :deep(.el-input__wrapper, .el-textarea__inner) {
    box-shadow: none;
    font-family: Source Han Sans CN;
    font-weight: 400 !important;
    font-size: 18px !important;
    color: #666666 !important;
    background: #fff !important;
    border-radius: 5px !important;
    border: 1px solid #bfbfbf !important;

    height: 37px !important;
  }
}
</style>
